home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-01 | 91.1 KB | 2,299 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SSG - SCREEN EDITOR AND PROGRAM GENERATOR
- Version 3.0
-
-
- REFERENCE MANUAL
-
- COPYRIGHT (C) 1989,1990 and 1991 BY:
-
- JOSE RODRIGUEZ ALVIRA
- AND
- JOSE R. LEBRON
-
-
-
-
-
-
-
-
- TABLE OF CONTENTS
-
- OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . 1
-
- HARDWARE REQUIREMENTS . . . . . . . . . . . . . . . . . . . . 1
-
- INSTALLING SSG . . . . . . . . . . . . . . . . . . . . . . . 1
-
- STARTING SSG . . . . . . . . . . . . . . . . . . . . . . . . 2
-
- THE STATUS BOX . . . . . . . . . . . . . . . . . . . . . . . 2
- Moving the STATUS BOX: . . . . . . . . . . . . . . . . . 2
- Turning STATUS BOX on and off: . . . . . . . . . . . . . 2
- STATUS BOX First Line: . . . . . . . . . . . . . . . . . 2
- STATUS BOX Second Line: . . . . . . . . . . . . . . . . 3
- STATUS BOX third, fourth fifth and sixth Lines: . . . . 3
-
- THE SSG EDITOR . . . . . . . . . . . . . . . . . . . . . . . 3
- Writing a character or symbol: . . . . . . . . . . . . . 3
- Moving the cursor: . . . . . . . . . . . . . . . . . . . 4
- Changing the cursor movement direction: . . . . . . . . 4
- Block operations: . . . . . . . . . . . . . . . . . . . 4
-
- SSG MENUS . . . . . . . . . . . . . . . . . . . . . . . . . . 5
- Main Menu . . . . . . . . . . . . . . . . . . . . . . . 5
- Load . . . . . . . . . . . . . . . . . . . . . . . 5
- Save . . . . . . . . . . . . . . . . . . . . . . . 6
- New . . . . . . . . . . . . . . . . . . . . . . . . 6
- Import ASCII . . . . . . . . . . . . . . . . . . . 6
- Save ASCII . . . . . . . . . . . . . . . . . . . . 6
- Save SSG 1.0 . . . . . . . . . . . . . . . . . . . 6
- Quit . . . . . . . . . . . . . . . . . . . . . . . 6
- DOS Shell . . . . . . . . . . . . . . . . . . . . . 6
- Options . . . . . . . . . . . . . . . . . . . . . . 7
- Edit Menu . . . . . . . . . . . . . . . . . . . . . . . 7
- Center Block . . . . . . . . . . . . . . . . . . . 7
- Copy Block . . . . . . . . . . . . . . . . . . . . 8
- Delete Block . . . . . . . . . . . . . . . . . . . 8
- Fill Block . . . . . . . . . . . . . . . . . . . . 8
- Move Block . . . . . . . . . . . . . . . . . . . . 8
- Shadow Block . . . . . . . . . . . . . . . . . . . 8
- Transfer Block . . . . . . . . . . . . . . . . . . 9
- Draw Box . . . . . . . . . . . . . . . . . . . . . 9
- Draw Line . . . . . . . . . . . . . . . . . . . . . 9
- Draw Box Line . . . . . . . . . . . . . . . . . . . 9
- Source Menu . . . . . . . . . . . . . . . . . . . . . . 9
- Define Color Variables . . . . . . . . . . . . . . 9
- Generate Screen . . . . . . . . . . . . . . . . . . 10
- Generating Source Files . . . . . . . . . . . . . . 12
-
-
- SSG Version 3.0 - Reference Manual - Page -i-
-
-
-
-
-
-
-
-
- Video Menu . . . . . . . . . . . . . . . . . . . . . . . 20
- Select Color . . . . . . . . . . . . . . . . . . . 20
- Pick Screen Color . . . . . . . . . . . . . . . . . 20
- Modify Block Color . . . . . . . . . . . . . . . . 21
- Block to Default Color . . . . . . . . . . . . . . 21
- Switch Screen . . . . . . . . . . . . . . . . . . . 21
- View . . . . . . . . . . . . . . . . . . . . . . . 21
- Change Video Mode . . . . . . . . . . . . . . . . . 21
- Modify Palette . . . . . . . . . . . . . . . . . . . 21
- Modify Character Set . . . . . . . . . . . . . . . . 22
-
- STEP BY STEP EXAMPLE . . . . . . . . . . . . . . . . . . . . 23
- Example #1 - Menu . . . . . . . . . . . . . . . . . . . 23
- Example #2 - MenuSystem . . . . . . . . . . . . . . . . 25
- Example #3 - Fields2 . . . . . . . . . . . . . . . . . . 28
-
- Appendix "A" . . . . . . . . . . . . . . . . . . . . . . . . . 32
-
- LICENSE . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
-
- DISCLAIMER . . . . . . . . . . . . . . . . . . . . . . . . . 36
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -ii-
-
-
-
-
-
-
-
-
- OVERVIEW
-
- SSG (SCL1 Screen Generator) is a full-screen, extended ASCII
- editor that will help you design your programs screens. With SSG
- you can draw, copy and move blocks of text, including boxes drawn
- using text characters. Full control of the screen's appearance
- is possible. SSG incorporates a character editor that lets you
- build you custom character sets (for EGA and VGA displays). Once
- you are satisfied with the screen, SSG will help you generate the
- data, structures and code from the information of your screens
- for use in programs written using the SCL1 Library functions. In
- fact, complete ready to compile programs can be generated with
- SSG. SSG has color and mouse support and can save and load your
- program's screen files with full color information. Text video
- modes such as 80 x 25 and 40 x 25 as well as VGA 80 X 28, EGA 80
- x 43 and VGA 80 x 50 modes are supported. You will have full
- control of the generated source by indicating SSG exactly how you
- want the code written.
-
- This document will guide you through the creation of screens and
- the generation of source code from the screens. SSG is easy to
- use but, in order to get the most out of it, you must learn how
- to make use of all its features. The time you spend learning SSG
- will save you a lot of programming time.
-
-
- HARDWARE REQUIREMENTS
-
- SSG will run in most MS/PC DOS computers. The program requires
- at least 320K of free memory and DOS 2.0 and above. No graphics
- display adapter is required if you use SSG to work only with text
- mode screens, however a VGA or EGA display adapter is required to
- modify character sets. A mouse is recommended but it is not
- absolutely necessary to use SSG (except to modify character
- sets), though with the mouse, the screen editing can be easier
- and faster.
-
-
- INSTALLING SSG
-
- There is no need to perform a special installation of SSG. The
- program is contained in one file. SSG will write a configuration
- file containing the default parameters and color information.
- The only installation required is to copy the SSG.EXE file to the
- working directory or disk.
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -1-
-
-
-
-
-
-
-
- STARTING SSG
-
- To start SSG, type SSG (specify program file drive and path if
- necessary) and press ENTER. Once you see SSG's welcome screen,
- press any key or press the mouse's left button to begin. The
- screen will clear and the STATUS BOX will appear in the lower
- left corner of the screen.
-
-
- USING SSG
-
- THE STATUS BOX
-
- The STATUS BOX is your interface with the program, it will give
- you very important information and will let you select the
- various options available. The STATUS BOX will look like this:
-
-
- +-------------|STATUS BOX|-------------+
- 1st Line | Main Edit Source Video F1 Help | <-- Menu
- 2nd Line | CURSOR 0 0 -> MOUSE 0 0 +---+ |
- 3rd Line | ABCDEFGHIJKLMNOPQRSTUVWXYZ | | | <-- Current
- 4th Line | ^ +---+ | Character
- | +---+ |
- 5th Line | abcdefghijklmnopqrstuvwxyz | | | <-- Block
- 6th Line | +---+ | Icon
- +--------------------------------------+
-
-
- Moving the STATUS BOX:
-
- The STATUS BOX can be moved to any place in the screen by
- pressing the ALT+U, D, R or L (for up, down, right and left)
- key combinations. You can also move it by pressing (and
- keeping pressed) the mouse's left button after pointing to
- the STATUS BOX title at the top of the box and dragging the
- mouse.
-
- Turning STATUS BOX on and off:
-
- The STATUS BOX can be turned on or off by pressing the F9
- key or by clicking the mouse's right button.
-
- STATUS BOX First Line:
-
- The STATUS BOX's first line contains the available menus.
- Four menus are included; Main, Edit Source and Video. You
- can also ask for help with the Help option.
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -2-
-
-
-
-
-
-
-
- STATUS BOX Second Line:
-
- The STATUS BOX's second line contains the following:
-
- CURSOR - Displays the current text cursor position.
- The screen's right top corner coordinates are 0,0.
-
- CURSOR DIRECTION - The arrow between the text cursor
- status marker and the mouse cursor status marker shows
- the direction the cursor will move after writing a
- character.
-
- MOUSE - Displays the mouse cursor position.
-
- CURRENT CHARACTER BOX - Shows the selected character.
-
- STATUS BOX third, fourth fifth and sixth Lines:
-
- The third row and fifth lines show the keyboard layout,
- these lines are static. Below each keyboard character
- the corresponding character that will be drawn is
- shown. This translation table shows which symbol is
- assigned to which keyboard key. For example, in the
- startup translation table, if you press "A" a vertical
- line will appear at the cursor position. After typing
- a character the cursor will move up, down, left or
- right depending on how you have set the current cursor
- direction option. You have four keyboard translation
- tables available. To toggle among them use the F4 key
- or click the mouse after pointing to the double arrow
- icon (fourth row at the left).
-
- BLOCK ICON - The block icon at the right of the fifth
- line is for selecting a block with the mouse.
-
- THE SSG EDITOR
-
- Now that you are familiar with the STATUS BOX, let us explore
- SSG's basic editing operations.
-
- Writing a character or symbol:
-
- To write a character or symbol at the current cursor
- position, press the key that corresponds to the desired
- symbol or character. The symbol or character written to the
- screen will depend on the current keyboard translation
- table. The cursor will advance one character position to
- the direction indicated by the cursor increment icon in the
- STATUS BOX. If you have a mouse you can "pick" a desired
- character or symbol from the STATUS BOX and write it to the
- screen location where the mouse is clicked. The symbol you
-
- SSG Version 3.0 - Reference Manual - Page -3-
-
-
-
-
-
-
-
- have selected will appear in the current character box at
- the right of the STATUS BOX's third line. This will remind
- you of what is the selected a symbol. To "un-select" the
- character, click the mouse's left button at current
- character box. If you do not have a mouse, you can "pick" a
- character or symbol by placing the text cursor over the
- character and pressing SHIFT+F4.
-
- Moving the cursor:
-
- The cursor can be moved by using the arrow keys. The Home,
- End, PgUp and PgDn keys move the cursor diagonally. The F5,
- F6, F7, F8 and TAB keys move the cursor several spaces at a
- time. You can place the text cursor to the current mouse
- cursor position by pressing the right mouse button while
- holding the left button pressed.
-
- Changing the cursor movement direction:
-
- After writing a character the cursor will move in the
- direction indicated by the cursor movement icon (an arrow
- next to the text cursor position display). You can change
- the default right direction by pressing F3 or by clicking
- the left button after pointing at this icon.
-
- Block operations:
-
- SSG's most powerful editing operations are performed using
- marked blocks. Once a block is marked you can move, edit,
- color, etc. the information inside the block.
-
- Marking Blocks:
-
- With the keyboard:
-
- Press F10 (Mark Block). The cursor size changes to a
- block and the STATUS BOX will disappear. Move the
- cursor to one of the block corners. Press ENTER, the
- cursor will stop blinking. Now use the cursor movement
- keys to enlarge the highlighted area to the desired
- size. Press ENTER and the block is marked. A block
- remains marked until you mark a new block.
-
- With the mouse:
-
- Click the mouse left button after pointing to the Block
- Icon. The STATUS BOX will disappear from the screen.
- Move the mouse cursor to one of the block corners.
- Press the mouse's left button and, without releasing
- it, drag the mouse to the block's opposite corner.
- Release the mouse button and the block is marked.
-
- SSG Version 3.0 - Reference Manual - Page -4-
-
-
-
-
-
-
-
- SSG MENUS
-
- Main Menu
-
- To select the Main Menu press the ALT+M keyboard combination or
- click your mouse after pointing to the Main keyword in the STATUS
- BOX. When you select this option the following menu will pop in
- a window:
-
-
- +-----|Main|-----+
- | Load |
- | Save |
- | New |
- | |
- | Import ASCII |
- | Save ASCII |
- | Save SSG 1.0 |
- | |
- | Quit |
- | DOS Shell |
- | |
- | Options |
- +----------------+
-
-
- The available options are:
-
- Load
-
- Permits you to load screens saved in SSG compatible file
- format. A file box will appear showing all files that match
- the search string, sorted by name and extension.
- Subdirectories will be preceded by "<". If you select a
- subdirectory, it will be added to the search string. You
- can edit the search string at any time. The search string
- initially is "*.SSG" (or the default extension you have set
- with "Options").
-
- To load a file you first highlight its filename using the
- arrow keys or your mouse and the press ENTER or click your
- mouse after pointing to the "LOAD" button. You can also
- select a file by double clicking your mouse after pointing
- to the desired name. You can cancel the operation by
- pressing the ESC key or clicking the mouse after pointing to
- the CANCEL button.
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -5-
-
-
-
-
-
-
-
- Save
-
- SSG can save your screen files with its color information.
- Enter the file name and path. SSG will warn you if a file
- with the same name already exists. If you had set the
- "Create Backup" option (see "Options"), SSG renames the old
- copy with the .BAK extension. If you don't specify an
- extension SSG adds the default extension specified with
- "Default Extension" (see "Options"). If you do not want an
- extension add a period to the end of its name.
-
- New
-
- Erase the buffer contents and start a new screen. All the
- screen information will be lost unless you save it to disk.
-
- Import ASCII
-
- You can import text information or screens prepared with
- your favorite text editor. This option will let you import
- information stored in ASCII format to SSG.
-
- Save ASCII
-
- The block you mark can be saved in the ASCII format to a
- disk file. This option is very useful for documenting your
- programs.
-
- Save SSG 1.0
-
- Version 3.X of SSG use a different file format than Version
- 1.X. SSG files now contain a header with the screen mode
- information, character tables and are compressed. SSG will
- recognize the screen files created by previous versions of
- SSG. Use this option if you want to save the files in the
- older format. Please refer to Appendix "A" for a complete
- description of SSG file formats.
-
- Quit
-
- Use this option to quit SSG. If the screen contents or the
- generated source code have not been saved you will be
- prompted if you want to do so before exiting.
-
- DOS Shell
-
- Use this option to temporarily shell to DOS. To return to
- SSG type "EXIT" at the DOS prompt line.
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -6-
-
-
-
-
-
-
-
- Options
-
- When this option is selected the following options screen
- shows up. In this screen you can set the default file
- Load/Save options. You will be able to specify the default
- extension for SSG and text files and whether you want or not
- to make backup of files. You will also be able to define
- the colors that will be used in SSG.
-
-
- +---------------------------------------------------------------+
- | - SSG OPTIONS - |
- | |
- | Default Extension: SSG Normal Color Highlight Color |
- | |
- | ASCII Extension: TXT Reverse Color Workspace Color |
- | |
- | (x) Create Backup files - OK - |
- +---------------------------------------------------------------+
-
- Edit Menu
-
- To select the Edit Menu press the ALT+E keyboard combination or
- click your mouse after pointing to the Edit keyword in the STATUS
- BOX. When you select this option the following menu will pop in
- a window:
-
-
- +-------|Edit|------+
- | Center Block |
- | Copy Block |
- | Delete Block |
- | Fill Block |
- | Move Block |
- | Shadow Block |
- | Transfer Block |
- | |
- | Draw Box |
- | Draw Line |
- | Draw Box Line |
- +-------------------+
-
- Center Block
-
- This option is used to center the marked block. When you
- select this option a window will pop into the screen
- prompting you how to center the block. The options are
- Horizontal, Vertical or Both. After making a selection the
- marked block will be highlighted, press ENTER or the mouse's
- left button to center it, you can cancel the operation by
- pressing ESC or the mouse's right button.
-
- SSG Version 3.0 - Reference Manual - Page -7-
-
-
-
-
-
-
-
- Copy Block
-
- You can make copies of a block and place the copy anywhere
- in the screen. To perform this operation select "Copy
- Block" from the menu. Move the copied block to the desired
- position using the cursor movement keys and press ENTER.
- With the mouse, press the mouse's left button and drag the
- block to it's new position.
-
- Delete Block
-
- This option will delete all the information included in the
- marked block, clearing the area. You can also use this
- option to change the color of the marked area. To change
- the area color, select the color you want using the "Select
- Color" option of the Video Menu and then delete the block.
- As with most block operations the marked block will be
- highlighted. Press ENTER or the mouse's left button to
- delete the block or press ESC or the mouse's right button to
- cancel. The block will be painted with the selected color
- (all the information inside the block will be erased).
-
- Fill Block
-
- This option will let you fill the block with a selected
- character. You must first select the character to be used
- for filling the block. To select a character you can "pick"
- it form the STATUS BOX with your mouse or pressing the
- SHIFT+F4 key combination after placing the text cursor over
- the desired character. Then select the "Fill Block" option,
- the STATUS BOX will disappear. If you press ENTER of the
- left mouse button the block will be filled, if you press ESC
- or the right mouse button the operation will be canceled.
-
- Move Block
-
- You can move a block anywhere in the screen. To perform
- this operation select "Move Block" from the menu. Move the
- block to the desired position using the cursor movement keys
- and press ENTER. With the mouse, press the mouse's left
- button and drag the block to it's new position. Block
- movement does not destroy the background.
-
- Shadow Block
-
- This option lets you add a shadow effect to the current
- block. When you select this option a window will pop with
- the different shadow options available. You can add a Solid
- Shadow, XORed shadow with current color XORed or an XORed
- shadow with the default color.
-
-
- SSG Version 3.0 - Reference Manual - Page -8-
-
-
-
-
-
-
-
- Transfer Block
-
- This option lets you transfer a block from the current
- screen to the alternate screen. The alternate screen is
- selected from the Video Menu. To transfer a block, switch
- screens and then select the Transfer Block option. The
- block will be copied to the alternate screen.
-
- Draw Box
-
- This option lets you draw a box around the marked block. A
- window will pop into the screen showing the different kinds
- of frames available. Select one by moving the little arrow
- above the boxes using the arrow keys or by clicking the
- mouse at the desired type of box. The Box will appear. To
- accept it press ENTER or click the mouse's left button. If
- you press ESC or click the mouse's right button the box will
- disappear.
-
- Draw Line
-
- This option will permit you to draw a single line (or the
- character or symbol selected). Mark the block area with one
- column position (for vertical lines) or one row position
- (for horizontal lines).
-
- Draw Box Line
-
- This option will permit you to draw lines inside boxes.
- Mark the area where the line is to be drawn. The line will
- be drawn with the correct line termination characters.
-
- Source Menu
-
- To select the Source Menu press the ALT+S keyboard combination or
- click your mouse after pointing to the Source keyword in the
- STATUS BOX. When you select this option the following menu will
- pop in a window:
-
- +---------|Source|---------+
- | Define Color Variables |
- | |
- | Generate Screen |
- +--------------------------+
-
- Define Color Variables
-
- This option will permit you to set the color variables to be
- used with the generated program. The following dialog box
- will pop into the screen:
-
-
- SSG Version 3.0 - Reference Manual - Page -9-
-
-
-
-
-
-
-
- +-----------------------------+
- | Defined color variables: |
- | |
- | Color3 |
- | Color4 |
- | HColor |
- | NColor |
- | RColor |
- | |
- | |
- | |
- | |
- | |
- +-----------------------------+
- | - ADD - - EDIT - |
- | |
- | - DELETE - - OK - |
- +-----------------------------+
-
- The window will contain a list of the defined color
- variables. You can add, edit or delete color variables to
- the list. When you select the ADD option, you will be
- prompted for a variable name. After typing the variable
- name a Color Selection Menu will appear in the screen. Use
- your keyboard or the mouse to select the desired color. The
- new variable will be added to the list. With the EDIT
- option, you can change a selected color variable. You will
- be prompted for a variable name and the color selection
- process is as for the ADD option. The DELETE option will
- delete the selected variable from the list. The OK option
- will remove the window from the screen and will save the
- color variables.
-
- When SSG generates source code it can write the actual color
- values or use predefined variables (see GENERATE SOURCE).
- The following default variables have been defined: NColor
- (white characters on a black background), RColor (black
- characters on a white background) and HColor (highlighted
- white characters on a black background). These variables
- names will be used by SSG when generating the source code.
- If you have used a color that has not been defined, SSG will
- write "unknown_?" (the "?" being the actual color value) to
- your source code.
-
- Generate Screen
-
- This option is used for beginning the program generation
- process. The following dialog box will appear in the
- screen:
-
-
-
- SSG Version 3.0 - Reference Manual - Page -10-
-
-
-
-
-
-
-
- +-------------------------------+
- | Generate coordinates using: |
- | |
- | (X) Actual coordinates |
- | ( ) #define |
- +-------------------------------+
- | Generate colors using: |
- | |
- | (X) Predefined variables |
- | ( ) Actual values |
- +-------------------------------+
- | |
- | ( ) Add headers files |
- | ( ) Add Color variables |
- | |
- | - OK - - CANCEL - |
- +-------------------------------+
-
- This dialog box contains the general information about the
- way the source code will be generated. The default options
- are marked with a check mark. To toggle an option on or off
- press the SPACEBAR or click the left mouse button after
- placing the mouse cursor over the desired option. With the
- keyboard, use TAB or SHIFT+TAB to move between options.
- When you have made your selections move the cursor to the OK
- button and press ENTER (or click the left mouse button).
- The options are:
-
- Generate coordinates using:
-
- You can generate the source file using actual screen
- position coordinates or relative coordinates. By
- selecting the #define option, SSG will write a define
- statement with the relative position information. You
- can later modify this define to change the position of
- your objects.
-
- Generate colors using:
-
- This option lets you select how the color values will
- be written to your source files. By selecting the
- Predefined Variables Option the instructions will be
- written using the previously defined color variables.
- By selecting the Actual Values Option the instructions
- will be written using the actual color values of the
- screen (see "Define Color Variables").
-
- Add headers files
-
- When this option is tagged your source file will
- contain the SCL1 #include headers.
-
- SSG Version 3.0 - Reference Manual - Page -11-
-
-
-
-
-
-
-
- Add Color variables
-
- When this option is tagged the previously defined color
- variables will be written to your source file.
-
- Generating Source Files
-
- Once you have specified the Source-Generation options the
- Source Generation Menu will be presented in your screen. It
- has four options:
-
- Add object
-
- Select this option to define an object in your screen.
- An object can be a window, a menu, a string, a field,
- etc. SSG will present a list of supported objects for
- selection.
-
- Done
-
- Select this option when no more objects need to be
- defined.
-
- Redo
-
- Discard the last defined object.
-
- View
-
- Select this option to view the source code being
- generated by SSG.
-
- When you select the "Add Object" option, an object list
- appears in the center of the screen. The list contains the
- different functions the SSG can program for you. The source
- code will be written exactly as you instruct SSG. You have
- to be careful to select the desired function in the correct
- order.
-
- When you select an object from this list, SSG will prompt
- you for the necessary information, such as; marking the
- affected area, indicating the colors, etc.
-
- SSG will write the source code using the SCL1 functions.
- The available objects refer to these functions. Refer to
- the SCL1 reference manual for a detailed description of each
- supported function.
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -12-
-
-
-
-
-
-
-
- The available objects are:
-
- BigCursor - Writes the source code for changing the
- cursor size to a block.
-
- Box - Writes the source code for drawing a box, SSG
- will read from the screen the frame type and box
- position. You will be prompted to mark the box area.
- Various options are available:
-
- Box - plain box.
-
- Box (Grow) - box that will grow.
-
- Box (Shadow) - box with shadow effect.
-
- Box (Sound) - box drawn with sound effect.
-
- Box (Grow+Shadow) - growing box with shadow
- effects.
-
- Box (Grow+Sound) - growing box with sound effects.
-
- Box (Grow+Shadow+Sound) - growing box with both
- shadow and sound effects.
-
- Box Line - Writes the data and call to the DrawBoxLine
- function according to the marked area. This will draw
- a line with correct termination characters inside a
- Box. SSG will read the corresponding line type from
- the screen.
-
- Calendar - Writes the source code for the structure and
- a call to the calendar function with the C_RESET,
- C_DRAW and C_BROWSE messages.
-
- Calendar (structure) - Writes only the Calendar
- structure according to the position and color
- information selected.
-
- Character Set - Writes a routine that will include a
- modified character set to you program. If you have not
- modified any character set, a message stating so will
- be presented in the screen.
-
- Clear Area - Writes a Cls function to clear a screen
- area. SSG will determine the area coordinates from the
- area you mark when prompted.
-
- CursorOff - Writes a CursorOff function call.
-
-
- SSG Version 3.0 - Reference Manual - Page -13-
-
-
-
-
-
-
-
- CursorOn - Writes a CursorOn function call.
-
- DrawLine - Writes the data and call to the DrawLine
- function according to the marked area.
-
- Fields - Writes the required structure and function
- call to make a data entry screen using the Fields
- function. You will first be prompted if you want to
- create a window. If you accept this option then SSG
- will guide you through this process as explained under
- the Window option below. SSG will prompt you to mark
- each field prompt and input area. A dialog box will be
- presented with the types of characters options for the
- defined field.
-
- +--------------------------------+
- | Type of characters to accept: |
- | |
- | ( ) Any |
- | ( ) Letters |
- | ( ) Digits |
- | ( ) Real numbers |
- | ( ) Exponential |
- | ( ) Spanish |
- | ( ) Punctuation |
- | ( ) Path & Filename |
- | ( ) Filename |
- | ( ) DOS Search |
- | ( ) Capitalize |
- | |
- | - OK - |
- +--------------------------------+
-
- You will be asked if you want to define more fields.
- If you want to include a validation or help function
- you must add the function's name to the finished source
- code.
-
- Fields2 - Writes the required structure and function
- call to make a data entry screen using the Fields2
- function. This option works similar to the Fields
- option described above. SSG will prompt you to
- indicate each field type, then it will prompt for the
- field information in a pop-up window.
-
-
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -14-
-
-
-
-
-
-
-
- +----------------------------------------------------+
- | Select field type: |
- | +------------------------------------------------+ |
- | |Calendar | |
- | |LineEditor | |
- | |ListWindow | |
- | |MouseButton | |
- | |ScrollWindow | |
- | |Select | |
- | |TagItem | |
- | +------------------------------------------------+ |
- | |
- | Press - TAB - to view screen. |
- |----------------------------------------------------|
- | Last defined object: |
- | InitWData(&scr0_wd0,NColor,0x0,5,25,14,44,NColor," |
- +----------------------------------------------------+
-
- You will be asked if you want to define more fields.
- If you want to include a validation or help function
- you must add the function's name to the finished source
- code.
-
- FileBox2 - Writes the required structure and function
- call to make a directory File Box using the FileBox2
- function. You will be prompted to mark the display
- area, colors and to indicate if you want to show
- subdirectories, read only, hidden and system files in a
- dialog box as follows:
-
- +----------------------------+
- | ─ FILEBOX INITIALIZATION ─ |
- | |
- | Display Files: |
- | |
- | ( ) Subdirectories |
- | ( ) Read Only |
- | ( ) Hidden |
- | ( ) System |
- | |
- | - OK - |
- +----------------------------+
-
- FileBox3 - Writes the required structure and function
- call to make a directory File Box using the FileBox3
- function. You will be prompted to mark the display
- area and colors. You will also be prompted to select
- what to show; size, time, directories, hidden, date,
- attributes, read only, system and how to sort the
- display as follows.
-
-
- SSG Version 3.0 - Reference Manual - Page -15-
-
-
-
-
-
-
-
- +--------------------------------------+
- | FileBox3 Initialization |
- | |
- | Show: |
- | |
- | (x) Size (x) Date |
- | (x) Time (x) Attributes |
- | (x) Directories ( ) Read Only |
- | ( ) Hidden ( ) System |
- | |
- | Sort by: |
- | |
- | (x) Name ( ) Extension ( ) Size |
- | ( ) Date ( ) Attributes |
- | |
- | Sort Mode: |
- | |
- | (x) Ascending ( ) Descending |
- | ( ) Directories first |
- | |
- | - OK - |
- +--------------------------------------+
-
- FillBlock - Writes the source code for a call to the
- FillBlock function. The fill character, position
- coordinates and colors will be read from the screen.
-
- Function Name - Prompts you for the function name and
- inserts it with an opening brace. For example, to
- begin a program you can type "main" when prompted.
-
- Function Close - Adds the closing brace to the source
- code.
-
- Get String - Writes a function call for getting a
- string from the console using the GetString function.
-
- HideMouse - Writes a HideMouse function call.
-
- InitMouse - Writes a InitMouse function call.
-
- LineEditor - Writes the structures and a call to the
- LineEditor function. You will be prompted to mark the
- prompt and field areas and the field options. SSG will
- read from the screen the information needed to fill a
- Line Editor structure. An line editor initialization
- screen will be displayed showing the principal
- structure information. In this screen you can either
- accept or modify the line editor options.
-
-
-
- SSG Version 3.0 - Reference Manual - Page -16-
-
-
-
-
-
-
-
- +--------------------------------------+
- | - LINE EDITOR INITIALIZATION - |
- | |
- | Maximum number of chars: 28 |
- | |
- | Type of chars to accept: |
- | |
- | (x) Any ( ) Letters |
- | ( ) Digits ( ) Real numbers |
- | ( ) Exponential ( ) Spanish |
- | ( ) Punctuation ( ) Path & Filename |
- | ( ) Filename ( ) DOS Search |
- | ( ) Capitalize |
- | |
- | Mask chars: |
- | |
- | (x) Accept mask chars ( ) Discard |
- | |
- | Format chars: |
- | |
- | (x) Typeover ( ) Insert |
- | |
- | - OK - |
- +--------------------------------------+
-
- LineEditor (structure) - Writes a LineEditor structure
- according to the information supplied.
-
- ListWindow - Writes the data and a call to the
- ListWindow function. You will be prompted to mark the
- display area.
-
- ListWindow (structure) - Writes a ListWindow structure
- according to the information supplied.
-
- Menu - Writes a call to the Menu function. You will be
- asked if you want to Save/Restore Screen, Draw Box and
- or add a Shadow effect to the menu. Then you will be
- prompted to mark each of the menu selection items, to
- indicate the menu structure name and the normal,
- reverse and highlight colors.
-
- MenuSystem - Writes the structures and a call to a
- MenuSystem function. You will be asked if you want a
- shadow effect on the pull-down menus, if you will
- access them with an ALT+key keyboard input and if you
- want to draw lines in empty spaces. You will then be
- prompted to mark the top-bar menu area and each option.
- To permit good mouse interface mark each option with
- one space before and after each option's text and do
- not leave spaces between them. You will be asked to
-
- SSG Version 3.0 - Reference Manual - Page -17-
-
-
-
-
-
-
-
- press the keyboard combination that will pull-down the
- menu for that option. Then you are required to mark
- each pull down menu area and menu options.
-
- MenuSystem (structure) - Writes a MenuSystem structure
- according to the supplied information.
-
- Modify Palette - Writes a function call to modify the
- color palette according to the current selected
- palette.
-
- MouseMenu - Writes a structure and a call to the
- MouseMenu function. You will be prompted to mark each
- of the menu selection items, the menu structure name
- and colors.
-
- MouseButton - Writes a call to the MouseButton
- function.
-
- MouseButton (structure) - Writes a MouseButton
- structure according to the supplied information.
-
- ScreenDump - Writes a set of character/attribute codes
- for each of the screen positions enclosed in the marked
- area. With it you can write code to duplicate any text
- screen.
-
- ScrollWindow - Writes a call to the ScrollWindow
- function. You will be prompted to mark the display
- area.
-
- ScrollWindow (structure) - Writes a ScrollWindow
- structure according to the information supplied.
-
- Shadow (solid color) - Writes a function call to draw a
- solid color shadow effect to the marked area.
-
- Shadow (XOR'ed) - Writes a function call to draw an
- XOR'ed shadow effect to the marked area.
-
- ShowMouse - Writes code for displaying the mouse.
-
- Select - Writes a call to the Select function.
-
- Select (structure) - Writes a Select structure
- according to the supplied information.
-
- SetVideoMode - Writes a SetVideoMode function call.
-
- Set EGA/VGA 25 - Writes the source code for changing
- the video mode to 25 lines display.
-
- SSG Version 3.0 - Reference Manual - Page -18-
-
-
-
-
-
-
-
- Set VGA 28 - Writes the source code for changing the
- video mode to 28 lines display.
-
- Set EGA/VGA 43/50 - Writes the source code for changing
- the video mode to 43/50 lines display.
-
- TagItem - Writes a call to the TagItem function.
-
- TagItem (structure) - Writes a TagItem structure
- according to the supplied information.
-
- Window (create) - When this option is selected you will
- be prompted to mark the windows' screen area. The a
- window initialization dialog box is shown where you can
- select the following window options; Save/Restore Area,
- Clear Area, Grow, Shrink, Draw Shadow and Draw Frame.
- After exiting this dialog box you will be asked if you
- want to write a window title, if you select YES you
- will be prompted to mark the title.
-
- +---------------------------+
- | - WINDOW INITIALIZATION - |
- | |
- | ( ) Save/Restore Area |
- | ( ) Clear Area |
- | ( ) Grow |
- | ( ) Shrink |
- | ( ) Draw Shadow |
- | ( ) Draw Frame |
- | |
- | - OK - |
- +---------------------------+
-
- Window(destroy) - Will close (destroy) a previously
- opened window and will restore the previous screen
- contents.
-
- WriteChar(s) - Writes a function call to the WriteChar
- function. The code written will select the character
- at the cursor position.
-
- WriteScreen - Writes the source code to write a string
- to the screen.
-
- When you have finished generating your source code you can
- exit the "Source Generating Menu" by selecting the "Done"
- option. If SSG has generated at least one line of source
- code, the "Save File", "View Source" and "New" options will
- be added to the SOURCE MENU. This menu will now look like
- this:
-
-
- SSG Version 3.0 - Reference Manual - Page -19-
-
-
-
-
-
-
-
- +---------|Source|---------+
- | Define Color Variables |
- | |
- | Generate Screen |
- | |
- | Save File |
- | |
- | View Source |
- | |
- | New |
- +--------------------------+
-
- Video Menu
-
- To select the Video Menu press the ALT+V keyboard combination or
- click your mouse after pointing to the Video keyword in the
- STATUS BOX. Everything related to video modes, colors, etc. is
- found in this menu.
-
- +---------|Video|----------+
- | Select Color |
- | Pick Screen Color |
- | Modify Block Color |
- | Block to Default Color |
- | |
- | Switch Screen |
- | View |
- | |
- | 40 columns x 25 lines |
- | 80 columns x 25 lines |
- | 80 columns x 28 lines |
- | 80 columns x 50 lines |
- | |
- | Modify Palette |
- | Modify Character Set |
- +--------------------------+
-
- Select Color
-
- When you select this option a "Color Selection Table" will
- appear in the screen. Use your keyboard or the mouse to
- select the desired color.
-
- Pick Screen Color
-
- This option lets you "pick" or select the default color from
- the screen by clicking the mouse or pressing ENTER after
- moving the cursor over the desired color.
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -20-
-
-
-
-
-
-
-
- Modify Block Color
-
- When you select "Modify Block Color" option a window will
- appear. As with most block operations the marked block will
- be highlighted, use the Up and Down arrow keys to change the
- foreground color. By pressing TAB you can toggle between
- foreground and background. You can toggle as many times as
- you like between foreground and background. Press the
- Spacebar to toggle blinking on/off. Press ENTER to exit
- with new colors or ESC to restore original colors.
-
- Block to Default Color
-
- This option will change a marked block's color to the
- default color.
-
- Switch Screen
-
- SSG has two working screens. These screens can hold
- different information. You can transfer information between
- screens. Both screen need no to be configured in the same
- video mode. With this option you can switch the active
- screen.
-
- View
-
- This option permits you to view the contents of both edit
- screens. Both the mouse and the text cursors and the STATUS
- BOX are removed form the screen.
-
- Change Video Mode
-
- The video modes available in your system will be displayed
- as, for example: 40 columns x 25 lines, 80 columns x 25
- lines, 80 columns x 28 lines or 80 columns x 50 lines (for
- VGA displays). You can pick any of the available video
- modes with your keyboard or mouse.
-
- Modify Palette
-
- You can visually change the background and foreground colors
- from the available palettes. A dialog box will pop to the
- screen. This box will contain different color bars with
- arrows at each side. By clicking the mouse (or using the up
- and down cursor direction keys) at these arrows you can
- change the palette colors and watch the resulting color.
- You can also type the palette number.
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -21-
-
-
-
-
-
-
-
- Modify Character Set
-
- When this option is selected a character editor screen is
- presented, as shown below. (Note: The screen has been
- edited so that it will fit in a printed page. Non-printable
- extended ASCII characters are shown in above with asterisks
- "*").
-
- *********************************!"#$%&'()*+,-./0123456789:;<=>?
- @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*
- ****************************************************************
- ****************************************************************
- 7 6 5 4 3 2 1 0 ¢ ASCII CODE: 155 ≡ OK ≡
- +----------------+
- 0 | | 7 6 5 4 3 2 1 0 ≡ CANCEL ≡
- 1 | ▒▒▒▒ | +----------------+
- 2 | ▒▒▒▒ | 0 | | ≡ DEFAULT ≡
- 3 | ▒▒▒▒▒▒▒▒ | 1 | ▒▒▒▒ |
- 4 | ▒▒▒▒ ▒▒▒▒ | 2 | ▒▒▒▒ | ≡ TRANSFER ≡
- 5 | ▒▒▒▒ | 3 | ▒▒▒▒▒▒▒▒ |
- 6 | ▒▒▒▒ | 4 | ▒▒▒▒ ▒▒▒▒ | 7 6 5 4 3 2 1 0
- 7 | ▒▒▒▒ | 5 | ▒▒▒▒ | +----------------+
- 8 | ▒▒▒▒ ▒▒▒▒ | 6 | ▒▒▒▒ | 0 | ▒▒▒▒ |
- 9 | ▒▒▒▒▒▒▒▒ | 7 | ▒▒▒▒ ▒▒▒▒ | 1 | ▒▒▒▒ |
- 10 | ▒▒▒▒ | 8 | ▒▒▒▒▒▒▒▒ | 2 | ▒▒▒▒▒▒▒▒▒▒▒▒ |
- 11 | ▒▒▒▒ | 9 | ▒▒▒▒ | 3 |▒▒▒▒ |
- 12 | |10 | ▒▒▒▒ | 4 |▒▒▒▒ |
- 13 | |11 | | 5 | ▒▒▒▒▒▒▒▒▒▒▒▒ |
- 14 | |12 | | 6 | ▒▒▒▒ |
- 15 | |13 | | 7 | ▒▒▒▒ |
- +----------------+ +----------------+ +----------------+
- VGA 16 scan matrix EGA 14 scan matrix CGA 8 scan matrix
-
- The first four rows show the ASCII characters of the current
- character set. All characters are shown in numerical order.
- By using the up or down arrow keys you can select a
- character to edit or you can click the mouse after
- positioning the mouse cursor over the desired character.
-
- The four mouse buttons at the right let you accept, cancel,
- return to the default character set or transfer the edited
- character set to the alternate screen (see Transfer on the
- Edit Menu).
-
- The three boxes show a magnified representation of the three
- available character matrices, 16 scanlines for VGA, 14
- scanlines for EGA and 8 scanlines for CGA. It is important
- to modify the three matrices if you are using a VGA display
- because the 28 line display uses the 14 scanline matrix and
- the 50 line display uses the 8 scanline matrix.
-
-
- SSG Version 3.0 - Reference Manual - Page -22-
-
-
-
-
-
-
-
- You will need a mouse in order to edit characters since
- there is no practical way to perform this task using the
- keyboard. To edit the characters use your mouse to position
- the cursor on the desired position and click the mouse to
- toggle the block on or off. The modifications done to the
- characters will immediately show in its full size
- representation.
-
-
- STEP BY STEP EXAMPLE
-
- The best way to learn about is SSG is to actually build a screen
- and generate a program source. The following instructions will
- guide you, step by step, through this process. We will now do
- three step-by-step examples of programs built with the aid of
- SSG.
-
- Example #1 - Menu
-
- - Start SSG.
-
- - Move the cursor to row 1, column 4.
-
- - Change the character translation table to the text mode (by
- pressing F4 or clicking your mouse after pointing to the
- arrow icon). Type "MAIN MENU"
-
- - Move the cursor to row 3, column 2. Type "First Option".
- Move the cursor to row 4, column 2 and type "Second Option.
- Continue incrementing the row position, aligning the column
- position and type "Third Option", "Fourth Option" and "Fifth
- Option". Move the cursor to row 9, column 2 and type
- "Exit".
-
- - Mark a block to surround the Menu, leave space for drawing a
- box around it. The block should begin at row 0, column 0 and
- end at row 10, column 16 (or it can be marked from row 10,
- column 16 to row 0, column 0).
-
- - From the "Edit Menu" select the "Draw Box" option. Select a
- double line box frame. Mark a new block starting at row 2,
- column 0 to column 16. Select the "DrawBoxLine" option from
- the "Edit Menu".
-
- - Mark the whole block again and select the "Center Block"
- option from the "Edit Menu". Center the block both
- horizontally and vertically.
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -23-
-
-
-
-
-
-
-
- - Note that you have three options starting with the letter
- "F". We must tell SSG what key will be used as a Hot-Key.
- Select the "Select Color" option from the "Video Menu" and
- select black background with highlighted white characters.
- Now move the cursor to the "F" in the "First Option" and
- type "F". Do the same with the "S" in "Second Option", the
- "T" in "Third Option", the"o" in "Fourth Option", the "i" in
- "Fifth Option", and the "E" in "Exit".
-
- - Now we are ready to generate the source code. Select the
- "Generate Screen" option from the "Source Menu". Tag the
- following options: Actual coordinates, Predefined variables,
- Add headers files and Add Color variables.
-
- - You will be prompted to indicate the screen name, type Menu.
-
- - Select the "Add Object" option. Select the "Function Name"
- option, when prompted indicate the function name as "main".
- - Select the "Add Object" option. Select the "Clear Screen
- Area" option, when prompted mark a block from row 0, column
- 0 to row 24, column 79 (the whole screen).
-
- - Select the "Add Object" option. Select the Box (grow)
- option. Mark the box area when prompted.
-
- - Select the "Add Object" option. Select the "Box Line"
- option. Mark the line area when prompted (the line that
- separates the "MAIN MENU" text from the rest of the menu.
-
- - Select the "Add Object" option. Select the "WriteScreen"
- option. Mark the text "MAIN MENU".
-
- - Select the "Add Object" option. Select the "Menu" option.
- Do not tag any of the display options presented in the Menu
- Initialization Prompt. You will be asked to mark the menu
- area. Then mark each menu option when prompted. For a
- neater look make the length of each selection equal. When
- you mark the last menu option ("Exit"), indicate that you do
- not want more options. Then select the "Reverse Color".
-
- - Select the "Add Object" option. Select the "Function Close"
- option.
-
- - You have finished writing the source code for the sample
- menu. You can take a look at the source code by selecting
- the "View" option. To finish the process select the "Done"
- option. Save the source file as "SAMPMENU.C" and exit SSG.
- It is recommended that the screen be saved for future
- practice.
-
-
-
- SSG Version 3.0 - Reference Manual - Page -24-
-
-
-
-
-
-
-
- The source file you have just created should look like this:
-
- #include <scl1.h>
- #include <scl1keys.h>
-
- /***** Menu DATA *****/
-
- int NColor=7;
- int RColor=112;
- int HColor=15;
-
- char Menu_str0[]="MAIN MENU";
-
- struct MenuOpt Menu_mo0[]={
- 10,33,"First Option ",'F',
- 11,33,"Second Option",'S',
- 12,33,"Third Option ",'T',
- 13,33,"Fourth Option",'o',
- 14,33,"Fifth Option ",'i',
- 16,33,"Exit ",'E',
- };
-
- /***** Menu CODE *****/
-
- main(void)
- {
- Cls(NColor,0,0,24,79);
- GSSBox(NColor,0,7,31,16,47,1,0,0);
- DrawBoxLine(NColor,0,9,31,9,47);
- WriteScreen(NColor,8,35,Menu_str0);
- Cls(NColor,7,31,17,46);
- Menu(NColor,RColor,NColor,6,Menu_mo0);
- }
-
- Example #2 - MenuSystem
-
- The screen you will need to practice how to generate a MenuSystem
- source code has been included in the screen file "SAMPMSYS.SSG".
-
- - Load the SAMPMSYS.SSG screen file into SSG.
-
- - Select the "Generate Screen" option from the "Source Menu".
- Tag the following options: Actual coordinates, Predefined
- variables, Add headers files and Add Color variables.
-
- - You will be prompted to indicate the screen name, type Msys.
-
- - Select the "Add Object" option. Select the "Function Name"
- option, when prompted indicate the function name as "main".
-
-
-
- SSG Version 3.0 - Reference Manual - Page -25-
-
-
-
-
-
-
-
- - Select the "Add Object" option. Select the "InitMouse"
- option, this will initialize your mouse if it is available.
-
- - Select the "Add Object" option. Select the "Clear Screen
- Area" option, when prompted mark a block from row 1, column
- 0 to row 24, column 79.
-
- - Select the "Add Object" option. Select the "MenuSystem"
- option.
-
- - You will be prompted to mark the bar menu area. Mark the
- whole top line from column 0 to column 79.
-
- - The Menu System Initialization window will pop into the
- screen. Select the "Division Lines" and "ALT Sensitive"
- options and the "OK" button.
-
- - You will be prompted to mark each of the bar menu options.
- For a better interface start the block one character to the
- left and finish the block one character to the right of each
- bar menu option. Mark the first option "File", you will be
- prompted to press the ALT+key combination that will call
- this option, press ALT+F. A window will pop asking if you
- want more bar menu options. Mark the other two bar menu
- options using the same procedure, this time indicating the
- ALT+O and ALT+E key combinations (for "Options" and "Exit").
-
- - After finishing defining the bar menu you will be prompted
- to define each individual pull down menu. The procedure is
- identical to that used in the Menu example. You will be
- asked to indicate the colors to be used.
-
- - After completing the Menu System definition select the
- "Function Close" object to finish the source code generation
- process. The generated code will look like this:
-
- #include <scl1.h>
- #include <scl1keys.h>
-
- /***** Msys DATA *****/
-
- int NColor=7;
- int RColor=112;
- int HColor=15;
- int Mess;
-
- MSBar Msys_msb0[]={
- 1,6,0x2100," File ",
- 7,15,0x1800," Options ",
- 16,21,0x1200," Exit ",
- };
-
- SSG Version 3.0 - Reference Manual - Page -26-
-
-
-
-
-
-
-
- MSOptions Msys_mso0[]={
- 2,2,"Open ",'O',
- 3,2,"Close ",'C',
- 5,2,"Delete ",'D',
- 6,2,"Copy ",'o',
- 7,2,"Compare",'m',
- };
- MSOptions Msys_mso1[]={
- 2,8,"Toggle Verify ",'T',
- 3,8,"Select Drive ",'S',
- 4,8,"Select Directory",'e',
- 6,8,"Backup ",'B',
- 7,8,"Restore ",'R',
- };
- MSOptions Msys_mso2[]={
- 2,17,"Help ",'H',
- 4,17,"Continue",'C',
- 6,17,"Quit ",'Q',
- };
-
- char ms0_wbuf[378];
-
- MSWindow Msys_msw0[]={
- 1,0,8,10,5,ms0_wbuf,Msys_mso0,
- 1,6,8,25,5,ms0_wbuf,Msys_mso1,
- 1,15,7,26,3,ms0_wbuf,Msys_mso2,
- };
-
- MSData Msys_msd0={112,15,7,112,15,Msys_msb0,Msys_msw0,3,0,0,0};
-
- /***** Msys CODE *****/
-
- main(void)
- {
- Cls(RColor,0,0,24,79);
- MenuSystem(MS_SHADOW_ON,(MSData *)0);
- MenuSystem(MS_LINE_ON,(MSData *)0);
- MenuSystem(MS_ALT_ON,(MSData *)0);
- MenuSystem(MS_DRAW,&Msys_msd0);
- do
- {
- if(Mess=KeyReady())
- {
- Mess=MenuSystem(MS_KEY,&Msys_msd0,Mess);
- if(KeyReady())
- GetKey();
- }
- else
- Mess=MenuSystem(MS_CHECK,&Msys_msd0);
- }while(Mess != MS_SELECT && Mess != MS_CANCEL);
- }
-
- SSG Version 3.0 - Reference Manual - Page -27-
-
-
-
-
-
-
-
- You can now compile and run the sample Menu System.
-
- Example #3 - Fields2
-
- The screen you will need to practice how to generate a Field2
- source code has been included in the screen file "SAMPFLD2.SSG".
-
- - Load the SAMPFLD2.SSG screen file into SSG.
-
- - Select the "Generate Screen" option from the "Source Menu".
- Tag the following options: Actual coordinates, Predefined
- variables, Add headers files and Add Color variables.
-
- - You will be prompted to indicate the screen name, type Fld.
-
- - Select the "Add Object" option. Select the "Function Name"
- option, when prompted indicate the function name as "main".
-
- - Select the "Add Object" option. Select the "Clear Screen
- Area" option, when prompted mark a block from row 0, column
- 0 to row 24, column 79 (the whole screen).
-
- - Select the "Add Object" option. Select the "Box" object and
- mark the box area. Then, using the "Box Line" object mark
- the interior line inside the box.
-
- - Select the "Add Object" option. Select the "WriteScreen"
- object and mark the "STUDENT RECORD" screen title. Select
- this object again and mark the "Member of:" prompt. (the
- other prompts will be defined when the corresponding fields
- are defined)
-
- - Select the "Add Object" option. Select the "Fields2"
- option. You will be presented with a list of field types.
- Select the "Line Editor" field type, you will be prompted to
- mark the prompt area, mark the prompt "Name:". Then you
- will be prompted to mark the data entry area. After marking
- the data entry area you will be prompted to tag the Line
- Editor options, since this field can have any characters and
- does not need any formatting, keep the default options.
-
- - You will now need to define the "Student Number:" field by
- specifying a "Line Editor" field type. You can specify in
- the "Line Editor" options that the field will contain only
- digits.
-
- - The "Sex" field is of the "Select" type. You will be
- prompted to mark the option strings. Mark just the text and
- not the parenthesis. When prompted if you want a field
- prompt, answer yes and mark the "Sex:" prompt.
-
-
- SSG Version 3.0 - Reference Manual - Page -28-
-
-
-
-
-
-
-
- - The next field is of the "Line Editor" type. For this field
- you can specify a "Formatted" type field with the "/" format
- character.
-
- - The "Member of:" field can have any number of options tagged
- so it is not of the Select type. We must define each
- available option as a "TagItem" field type. In this case we
- must select the "TagItem" field type four times and mark the
- field string for each option.
-
- - The remaining fields are of the "MouseButton" type. After
- selecting the MouseButton option you will be prompted to
- mark the area and the text for each option.
-
- - After defining all three MouseButtons instruct SSG that you
- do not want any more fields. The select the "Function
- Close" object. The generated code will look like this:
-
- #include <scl1.h>
- #include <scl1keys.h>
-
- /***** Fld DATA *****/
-
- int NColor=7;
- int RColor=112;
- int HColor=15;
-
- char Fld_str0[]="STUDENT RECORD";
-
- char Fld_str1[]="Member of:";
-
- char Fld_ledbuf0[40];
-
- LEData Fld_led0={
-
- 7,9,13,"Name:",112,9,19,39,39,CC_ANY,0,0,Fld_ledbuf0,0,0,0,2,1,0,
- 0,0,0,0,0,0};
-
- char Fld_ledbuf1[7];
-
- LEData Fld_led1={7,11,13,"Student Number:",112,11,29,6,6,
- CC_DIGIT,0,
- 0,Fld_ledbuf1,0,0,0,2,1,0,0,0,0,0,0,0};
-
- SData1 Fld_sd1_0[]={
- 13,18,"Male",
- 13,28,"Female",
- 0};
-
- SData2 Fld_sd2_0={7,13,13,"Sex:",0,0,0,0};
-
-
- SSG Version 3.0 - Reference Manual - Page -29-
-
-
-
-
-
-
-
- char Fld_ledbuf2[9]=" / / ";
-
- LEData Fld_led2={7,15,13,"Date
- Admitted:",112,15,28,8,8,CC_DIGIT,0,0,
- Fld_ledbuf2,"/",0,0,2,1,0,0,0,0,0,0,0};
-
- TIData Fld_ti0={7,12,48,0,"Honor Society",0,0};
-
- TIData Fld_ti1={7,13,48,0,"Basketball Team",0,0};
-
- TIData Fld_ti2={7,14,48,0,"Photography Club",0,0};
-
- TIData Fld_ti3={7,15,48,0,"Oratory Club",0,0};
-
- MBData Fld_mb0={7,112,17,17,17,31,17,17,"≡ NEXT RECORD
- ≡",0,0,0,0};
-
- MBData Fld_mb1={7,112,17,36,17,47,17,36,"≡ PREVIOUS ≡",0,0,0,0};
-
- MBData Fld_mb2={7,112,17,54,17,61,17,54,"≡ QUIT ≡",0,0,0,0};
-
- FData1 Fld_fd1_0[]={
- LINE_EDITOR,&Fld_led0,0,FieldCheck,
- LINE_EDITOR,&Fld_led1,0,FieldCheck,
- SELECT,Fld_sd1_0,&Fld_sd2_0,FieldCheck,
- LINE_EDITOR,&Fld_led2,0,FieldCheck,
- TAG_ITEM,&Fld_ti0,0,FieldCheck,
- TAG_ITEM,&Fld_ti1,0,FieldCheck,
- TAG_ITEM,&Fld_ti2,0,FieldCheck,
- TAG_ITEM,&Fld_ti3,0,FieldCheck,
- MOUSE_BUTTON,&Fld_mb0,0,FieldCheck,
- MOUSE_BUTTON,&Fld_mb1,0,FieldCheck,
- MOUSE_BUTTON,&Fld_mb2,0,FieldCheck,
- 0};
-
- FData2 Fld_fd2_0;
-
- /***** Fld CODE *****/
-
- main(void)
- {
- Cls(NColor,0,0,24,79);
- Box(NColor,0,5,9,18,70);
- DrawBoxLine(NColor,0,7,9,7,70);
- WriteScreen(NColor,6,33,Fld_str0);
- WriteScreen(NColor,11,48,Fld_str1);
- Fields2(F_INIT,Fld_fd1_0,&Fld_fd2_0);
- Fields2(F_COLORS,Fld_fd1_0,&Fld_fd2_0,NColor,RColor);
- Fields2(F_DRAW,Fld_fd1_0,&Fld_fd2_0);
- Fields2(F_ACTIVE,Fld_fd1_0,&Fld_fd2_0);
- }
-
- SSG Version 3.0 - Reference Manual - Page -30-
-
-
-
-
-
-
-
- As you can see, the example programs are almost completely
- written for you. The file created by SSG will contain all the
- data and code needed to produce the screens. Your program is
- ready to be compiled. Of course, most of the times you will want
- to modify, add or continue programming using the structures
- created for you by SSG.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -31-
-
-
-
-
-
-
-
- Appendix "A" - SSG File Format
-
- Version 1.0 format:
-
- Data is organized as an exact copy of the video buffer.
- Data starts at the screen top left corner, moves
- horizontally and down until all screen lines are covered.
- Each character is followed by its color attribute. Since
- only the 80 x 25 text mode is supported, these files are
- always 4,000 bytes in size. SSG reads the data directly to
- an internal buffer that is then copied to the video buffer.
-
- Version 2.X format:
-
- Starting with version 2.0, SSG added support for several
- text video modes like 40 x 25, 80 x 43 and 80 x 50. In
- order to include the video mode information, a header was
- added. To reduce the file size a simple but effective
- compression algorithm was added.
-
- Version 2.X header:
-
- bytes purpose
-
- 0-3 Are used for file identification. They are
- set to SSG2.
-
- 4-5 Are read as an integer. Bits 0-1 hold the
- video mode:
-
- 0 = 40 x 25
- 1 = 80 x 25
- 2 = 80 x 50 (VGA) or 80 x 43 (EGA)
- 3 = 80 x 28
-
- bit 8 of the integer is set to 1 if data is
- compressed or 0 if data is not compressed.
- Other bits are not used and are normally set
- to 0.
-
- 6-7 Are read as an unsigned integer. If the data
- has been compressed this value equals the
- size in bytes of the compressed color
- information.
-
- 8-9 Are read as an unsigned integer. If the data
- has been compressed this value equals the
- size in bytes of the compressed text
- information.
-
-
-
- SSG Version 3.0 - Reference Manual - Page -32-
-
-
-
-
-
-
-
- Appendix "A" - SSG File Format
-
- The following structure is used by SSG to read the file
- header:
-
- typedef struct{
- char Id[4]; file ID
- unsigned int mode; video mode
-
- unsigned int csize; size in bytes of color
- information
-
- unsigned int tsize; size in bytes of text
- information
-
- }FHEADER;
-
- Version 2.X data:
-
- Following the header, data is organized in one of two
- ways. If data is not compressed, the format is the
- same as for Version 1.0. If the data has been
- compressed, the color information is stored first
- followed by the text or character information. The
- decision to compress data is taken after the data is
- initially compressed. Under certain circumstances the
- "compressed" data may be larger than uncompressed data,
- in these cases data is stored uncompressed.
-
- Reading color information:
-
- The csize element in the file header holds how many
- bytes of color information the file has.
-
- The compression algorithm is very simple: the first
- byte is an unsigned char value followed by a data
- value. The first byte tells us how many times the
- following color value is repeated. For example, if the
- first byte is 80 and the second byte is 7 it means that
- the first 80 characters will have a color attribute of
- 7. Pair of bytes like this are repeated until the all
- the screen color information is encoded.
-
- Reading text information:
-
- The tsize element in the file header holds the number
- of bytes of text information in the file. Data is
- compressed using the same algorithm used for color
- information.
-
-
-
- SSG Version 3.0 - Reference Manual - Page -33-
-
-
-
-
-
-
-
- Appendix "A" - SSG File Format
-
- Version 3.0 format:
-
- Starting with version 3.0, SSG supports character set and
- palette modification. Palette information is stored in
- version 3.0 file header. Character modification information
- is stored after the header and before the color and text
- data.
-
- Version 3.0 header:
-
- Version 3.0 header is similar to Version 2.X header. The
- first four bytes used for identification are now initialized
- to SSG3. The palette information is stored after the tsize
- element in a 17 byte array (Palette entries 0-15 followed by
- border color). The following structure is used:
-
- typedef struct{
- char Id[4]; initialized to SSG3
- unsigned int mode;
- unsigned int csize;
- unsigned int tsize;
- char palette[17]; palette + border colors
- }FHEADER3;
-
- Character set information:
-
- Following the header is the character set information. The
- first two bytes that follow (integer) tell how many
- characters have been defined. This value is 0 when no
- character has been redefined.
-
- Character definition follow these two bytes using the
- following format for each defined character:
-
- int character's ASCII value
-
- char array 16 bytes array of the 8 x 16 (VGA) character
- definition.
-
- char array 14 bytes array of the 8 x 14 (EGA) character
- definition.
-
- char array 8 bytes array of the 8 x 8 (EGA) character
- definition.
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -34-
-
-
-
-
-
-
-
- Appendix "A" - SSG File Format
-
- Reading text and color information:
-
- Text and color information is stored in the same format as
- in SSG 2.X files. To calculate the offset at which text and
- color information begins you should add the size of the
- FHEADER3 structure plus the two bytes used to save the
- number of characters redefined plus 40 for each redefined
- character.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -35-
-
-
-
-
-
-
-
- LICENSE
-
- SSG is a copyrighted material and is NOT a Shareware or User
- Supported product. SSG is supplied to all registered users of
- the SCL1 library, as part of the registration package and should
- not be freely distributed or copied except for backup purposes.
- All registered users are granted a non exclusive license to use
- this program for any use. The Shareware version of the SCL1
- library (which does not include SSG) may be freely distributed.
-
- This program has been thoroughly tested and, to the best of our
- knowledge, perform as this documentation describe. We cannot
- accept any responsibility for any problems which may occur
- through its use. After examining this document and other
- included file, if you feel that this program is not suitable for
- your use, please do not use it.
-
- DISCLAIMER
-
- THIS SOFTWARE AND MANUAL ARE SOLD "AS IS" AND WITHOUT WARRANTIES
- AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES
- WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE
- AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO
- WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
-
- GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
- THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
- THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY
- LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
- REPLACEMENT OR REFUND OF PURCHASE PRICE.
-
- Feel free to send any comments or suggestions. If you find any
- bugs please let us know so that they can be traced and fixed.
- Please include with your comments any relevant information, such
- as; hardware configuration, description of the bug or problem and
- if possible a section of the problem code. Write to:
-
- José Rodríguez Alvira
- El Monte Sur 190, Apt. B-342,
- Hato Rey, Puerto Rico, 00918
-
- You can leave us a message through the Compuserve I.D. No.
- 70262,1562 or BIX Name jalvira.
-
- The latest version of SCL1, sample programs and comments about
- these programs are available in:
-
- TECH BBS (Sysop: José Romero)
-
- (809)731-2322
-
-
- SSG Version 3.0 - Reference Manual - Page -36-
-
-
-
-
-
-
-
- You do not have to be a registered member of this BBS to be able
- to download SCL1 files. If you call for the first time, after you
- answer the questionnaire you can locate SCL1 files in the FREE
- directory under the FILES menu. Though new users have a 15
- minutes per call time restrictions, the files located in this
- directory can be downloaded even if they take longer than 15
- minutes to transfer. In order to download more than one file use
- a batch type protocol.
-
- You can leave any comments, suggestions or questions in this BBS
- directed to JOSE ALVIRA or JOSE LEBRON. We will reply these
- messages in the same BBS.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SSG Version 3.0 - Reference Manual - Page -37-
-